<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<style>
    input.ng-invalid {
        background-color: red;
    }
</style>
<body>
<!--<div ng-app="myApp" ng-controller="myCtrl">
    姓名：<input  ng-model="name" >
    <h3>你输入了{{name}}</h3>
</div>-->

<!--<form ng-app="" name="myForm">
    Email:<input type="email" name="myAddress" ng-model="text">
    <span ng-show="myForm.myAddress.$error.email">不是一个合法的邮箱地址</span>
</form>-->

<!--<form ng-app="" name="myForm" ng-init="myText='587887@qq.com'">
    Email:<input type="email" name="myAddress" ng-model="myText" required="true">
    <h1>状态</h1>
    {{myForm.myAddress.$valid}}
    {{myForm.myAddress.$dirty}}
    {{myForm.myAddress.$touched}}
</form>-->
<!--
ng-empty
ng-not-empty
ng-touched
ng-untouched
ng-valid
ng-invalid
ng-dirty
ng-pending
ng-pristine
->
<form ng-app="" name="myForm" >
    Email:<input type="email" name="myAddress" ng-model="myText" required="true">
</form>


<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
<!--<script>
    var app = angular.module("myApp",[]);
    app.controller("myCtrl",function($scope){
        $scope.name = "kkvv001";
    });
</script>-->
</body>
</html>